<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragment :: head(~{::title})">
    <title>博客管理后台</title>
</head>
<body class="hold-transition skin-blue sidebar-mini">

<!--头部导航-->
<nav th:replace="_fragment :: left-menu"></nav>
<!----------------------------------------------------------------------------------------->

<!-- Content Header (Page header) -->
<section class="content-header"></section>

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-md-2">
            <!-- Profile Image -->
            <div class="box box-primary">
                <div class="box-body box-profile">
                    <img class="profile-user-img img-responsive img-circle" src="/static/img/default-head.jpg" alt="User profile picture">

                    <h3 th:text="${author.username}" class="profile-username text-center">Nina Mcintire</h3>

                    <p class="text-muted text-center" th:text="'码龄'+${author.registAge}">Software Engineer</p>

                    <ul class="list-group list-group-unbordered">
                        <li class="list-group-item">
                            <b>原创</b> <a class="pull-right" th:text="${author.passage}+'篇'">13,287</a>
                        </li>
                        <li class="list-group-item">
                            <b>粉丝</b> <a class="pull-right" th:text="${author.fans}">212</a>
                        </li>
                        <li class="list-group-item">
                            <b>关注</b> <a class="pull-right" th:text="${author.attention}">457</a>
                        </li>
                    </ul>

                    <a href="#" class="btn btn-primary btn-block"><b>Follow</b></a>
                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->

            <!-- About Me Box -->
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">About Me</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <strong><i class="fa fa-envelope margin-r-5"></i> 邮箱</strong>

                    <p class="text-muted" th:text="${author.email}">
                        951747357@qq.com
                    </p>

                    <hr>

                    <strong><i class="fa fa-map-marker margin-r-5"></i> 最近一次登录</strong>

                    <p class="text-muted" th:text="${author.lastTime}">2021-04-28</p>

                    <hr>

                    <strong><i class="fa fa-pencil margin-r-5"></i> 分类</strong>

                    <p>
                    <div th:each="c:${author.catagoryName}"><a th:text="${c.catagoryName}" th:href="@{/catagory/findCatagory/{id}(id=${c.catagoryId})}">分类1</a></div>
                    </p>

                    <hr>

                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>

        <div class="col-md-10">
            <!-- 内容区域 -->
            <!--<div class="content-wrapper">-->
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1 th:text="${catagoryName}">
                    我的分类
                    <small>weblog</small>
                </h1>
            </section>

            <!-- Main content -->
            <section class="content">
                <div class="box">
                    <div class="box-header">

                        <h3 class="box-title"></h3>
                        <label style="color: darkred;" th:text="${Msg}"></label>
                    </div>
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <!--点击某一行，应该跳到文章详情页-->
                            <tr>
                                <th>文章ID</th>
                                <th>标题</th>
                                <th>描述</th>
                                <th>点赞量</th>
                                <th>浏览量</th>
                                <th></th>
                                <th></th>
                            </tr>
                            <tr th:each="p:${passageList}">
                                <td th:text="${p.passageId}"></td>
                                <td th:text="${p.title}"></td>
                                <td th:text="${p.described}"></td>
                                <td th:text="${p.liked}"></td>
                                <td th:text="${p.isOriginal}"></td>
                                <td>
                                    <span class="label label-success" th:text="${p.isOriginal}==1?'原创':'转载'">Approved</span>
                                </td>
                                <td>
                                    <button type="button" class="btn btn-default btn-sm" style="color: grey">
                                        <a th:href="@{/passage/findPassage/{id}(id=${p.passageId})}" >查看文章</a>
                                    </button>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </section>
            <!-- /.content -->
        </div>
        <!-- 内容区域 /-->
    </div>
    </div>
</section>


<!----------------------------------------------------------------------------------------->
<!--底部footer-->
<footer th:replace="_fragment :: footer"></footer>
</body>

<th:block th:replace="_fragment :: script">
</th:block>


</html>
